﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace SLBehaviourSystem
{
    [ConditionComponent]
    public class IsKeyDownComponent : StateComponent
    {
        protected override void OnInit()
        {
            base.OnInit();
            enabled = true;
        }

        private void Update()
        {
            foreach (var item in States)
            {
                if (Input.GetKey((KeyCode)int.Parse(item.Key)))
                {
                    item.Value.Argument = true;
                }
                
            }
        }
    }
}
